<!DOCTYPE html>
<html lang="en"xmlns:th="http://www.thymeleaf.org">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <title>软件园商城</title>
  <link href="css/bootstrap.min.css" rel="stylesheet">
  <link href="css/signin.css" rel="stylesheet">
</head>

<body class="text-center">
<form class="form-signin" action="#" th:action="@{/doLogin}" method="post">
  <img class="mb-4" src="img/bootstrap-solid.svg" alt="" width="72" height="72">
  <h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
  <p style="color:red" th:text="${msg}"></p>
  <label class="sr-only">用户名</label>
  <input type="text" name="name" class="form-control" placeholder="Username" required="" autofocus="">
  <label class="sr-only">密码</label>
  <input type="text" name="password" class="form-control" placeholder="密码" value=""/><br>
  <!-- 新增验证码输入区域 -->
  <div class="form-group row">
    <div class="col-8">
      <input type="text" name="code" class="form-control"
             placeholder="验证码" required>
    </div>
    <div class="col-4">
      <img src="/captcha"
           onclick="this.src='/captcha?t='+new Date().getTime()"
           style="cursor:pointer; height:38px;"
           title="点击刷新验证码">
    </div>
  </div>
  <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button><br>
  <p class="mt-5 mb-3 text-muted">没有账号？<a th:href="@{/toRegister}">立即注册</a></p>
  <p class="mt-5 mb-3 text-muted">© 2018-2020</p>
</form>
</body>

</html>